//
//  SWOrderListFetchReq.swift
//  ChildStory
//
//  Created by linhan on 2017/1/20.
//  Copyright © 2017年 Aiya. All rights reserved.
//

import Foundation

class SWOrderListFetchReq: SWBaseRequest
{
    override init()
    {
        super.init()
        api = SWRequestAPI.AddressCreate
    }
    
    override var url:String
    {
        return "http://mpic.bbyiya.com/order/buylist"
    }
    
    override func JSONToModel(_ json:JSON, JSONString:String, JSONData:Data) -> AnyObject?
    {
        //trace(json)
        return Mapper<SWOrderListFetchRsp>().map(JSONString: JSONString)
    }
}

class SWOrderListFetchRsp: NSObject,Mappable
{
    var statu:String?
    var orders:[SWOrderRsp]?
    
    
    required init?(map: Map) { }
    
    // Mappable
    func mapping(map: Map) {
        statu             <- map["Statu"]
        orders             <- map["BaseModle"]
    }
}
